package io.renren.modules.generator.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.R;
import io.renren.common.vo.ProductAddressVo;
import io.renren.modules.generator.entity.AddressEntity;
import org.apache.poi.ss.usermodel.Workbook;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-11-27 14:55:22
 */
public interface AddressService extends IService<AddressEntity> {

    List<AddressEntity> queryPage(Map<String, Object> params);

    List<AddressEntity> queryToExcelExport(Map<String, Object> params);

    int queryTotalToExcelExport(Map<String, Object> params);

    int queryPageTotal(Map<String, Object> params);

    void updateStatusByIds(List<Integer> list);

    List<AddressEntity> queryAddressesByCustomerId(int id);

    Map<String,List<AddressEntity>> queryAddressByCustomerIdAndByAddressProperty(int customerId);

    AddressEntity info(Integer id);

    Map<String,List<AddressEntity>> queryAllFromAddressAndAllToAddress();

    AddressEntity queryByCode(String code);

    Set<AddressEntity> queryFromAddressEntityListByToAddressIdAndProductId(Integer toAddressId, Integer productId);

    R importFile(Workbook book);

    void save(AddressEntity address);

    void update(AddressEntity address);

    List<AddressEntity> queryEntityListByCode(String code, String type, Integer customerId);


    List<ProductAddressVo> queryToAddressByToAddressNameAndProductId(String addressName, Integer productId);
}

